export default {
  methods: {
    showName() {
      return this.$store.getters.name
    },
    showSider() {
      return this.$store.getters.sidebar
    },
    toggleSideBar() {
      this.$store.dispatch('app/toggleSideBar')
    },
    async logout() {
      await this.$store.dispatch('user/logout')
    },
    async removeCookie() {
      await this.$store.dispatch('user/removeCookie')
    },
    showLogo() {
      return this.$store.state.settings.sidebarLogo
    },
    sidebar() {
      return this.$store.state.app.sidebar
    },
    device() {
      return this.$store.state.app.device
    },
    fixedHeader() {
      return this.$store.state.settings.fixedHeader
    },
    handleClickOutside() {
      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
    },
    async handleClickLogin(form) {
      return await this.$store.dispatch('user/login', form)
    },
    async getMenus() {
      return await this.$store.dispatch('user/getMenus')
    },
    async deleteView(view) {
      await this.$store.dispatch('tagsView/delView', view)
    },
    async delOthersView(selectedTag) {
      await this.$store.dispatch('tagsView/delOthersViews', selectedTag)
    },
    async delAllView() {
      await this.$store.dispatch('tagsView/delAllViews')
    },
    visitedViews() {
      return this.$store.state.tagsView.visitedViews
    },
    addVisitedView(tag) {
      this.$store.dispatch('tagsView/addVisitedView', tag)
    },
    addView(route) {
      this.$store.dispatch('tagsView/addView', route)
    },
    updateVisitedView(route) {
      this.$store.dispatch('tagsView/updateVisitedView', route)
    },
    async delCachedView(view) {
      await this.$store.dispatch('tagsView/delCachedView', view)
    },
    async delView(view) {
      return await this.$store.dispatch('tagsView/delView', view)
    },
    async delOthersViews(tag) {
      await this.$store.dispatch('tagsView/delOthersViews', tag)
    },
    async delAllViews() {
      return await this.$store.dispatch('tagsView/delAllViews')
    },
    async getCustomerData(playload) {
      return await this.$store.dispatch('customer/getCustomerData', playload)
    },
    CustomerTableData() {
      return this.$store.state.customer.customerData
    },
    CustomerDataCount() {
      return this.$store.state.customer.customerDataCount
    },
    async getGarageData(playload) {
      return await this.$store.dispatch('garage/getGarageData', playload)
    },
    GarageTableData() {
      return this.$store.state.garage.garageData
    },
    GarageDataCount() {
      return this.$store.state.garage.garageDataCount
    },
    async getVideoData(playload) {
      return await this.$store.dispatch('video/getVideoData', playload)
    },
    VideoTableData() {
      return this.$store.state.video.videoData
    },
    VideoDataCount() {
      return this.$store.state.video.videoDataCount
    },
    async getIntroduceData(playload) {
      return await this.$store.dispatch('introduce/getIntroduceData', playload)
    },
    IntroduceData() {
      return this.$store.state.introduce.introduceData
    },
    async getIntroduceRow(playload) {
      return await this.$store.dispatch('introduce/getIntroduceRow', playload)
    },
    IntroduceRow() {
      return this.$store.state.introduce.introduceRow
    },
    async getVehicleData(playload) {
      return await this.$store.dispatch('vehicle/getVehicleData', playload)
    },
    VehicleTableData() {
      return this.$store.state.vehicle.vehicleData
    },
    VehicleDataCount() {
      return this.$store.state.vehicle.vehicleDataCount
    },
    async getCustomerManageData(playload) {
      return await this.$store.dispatch('customerManage/getCustomerManageData', playload)
    },
    CustomerManageTableData() {
      return this.$store.state.customerManage.customerManageData
    },
    CustomerManageDataCount() {
      return this.$store.state.customerManage.customerManageDataCount
    },
    async getOrderData(playload) {
      return await this.$store.dispatch('order/getOrderData', playload)
    },
    OrderTableData() {
      return this.$store.state.order.orderData
    },
    OrderDataCount() {
      return this.$store.state.order.orderDataCount
    },
    async getTypeData(playload) {
      return await this.$store.dispatch('type/getTypeData', playload)
    },
    TypeTableData() {
      return this.$store.state.type.typeData
    },
    TypeDataCount() {
      return this.$store.state.type.typeDataCount
    },
    async editTypeData(playload) {
      return await this.$store.dispatch('type/editTypeData', playload)
    },
    async editCustomerData(playload) {
      return await this.$store.dispatch('customer/editCustomerData', playload)
    },
    async getCarTypeData(playload) {
      return await this.$store.dispatch('type/getCarTypeData', playload)
    },
    CarTypeList() {
      return this.$store.state.type.carTypeList
    },
    async getCarNameData(playload) {
      return await this.$store.dispatch('type/getCarNameData', playload)
    },
    CarNameList() {
      return this.$store.state.type.carNameList
    },
    async editGarageData(playload) {
      return await this.$store.dispatch('garage/editGarageData', playload)
    },
    async editVideoData(playload) {
      return await this.$store.dispatch('video/editVideoData', playload)
    },
    async editVehicleData(playload) {
      return await this.$store.dispatch('vehicle/editVehicleData', playload)
    },
    async editIntroduceData(playload) {
      return await this.$store.dispatch('introduce/editIntroduceData', playload)
    },
    async getRoleData(playload) {
      return await this.$store.dispatch('role/getRoleData', playload)
    },
    RoleTableData() {
      return this.$store.state.role.roleData
    },
    RoleDataCount() {
      return this.$store.state.role.roleDataCount
    },
    async getAccountData(playload) {
      return await this.$store.dispatch('account/getAccountData', playload)
    },
    async editAccountData(playload) {
      return await this.$store.dispatch('account/editAccountData', playload)
    },
    AccountTableData() {
      return this.$store.state.account.accountData
    },
    AccountDataCount() {
      return this.$store.state.account.accountDataCount
    },
    async getParameterData(playload) {
      return await this.$store.dispatch('parameter/getParameterData', playload)
    },
    async editParameterData(playload) {
      return await this.$store.dispatch('parameter/editParameterData', playload)
    },
    ParameterTableData() {
      return this.$store.state.parameter.parameterData
    },
    ParameterDataCount() {
      return this.$store.state.parameter.parameterDataCount
    },
    async getViewRoleData(playload) {
      return await this.$store.dispatch('role/getViewRoleData', playload)
    }
  }
}
